package com.itcast.innerclass.Demo01;

/*
要写注释哦!!!
*/
public class Test {
    public static void main(String[] args) {
        Swimming swimming1=new Swimming() {
            @Override
            public void swin() {
                System.out.println("狗刨飞快~~~");
            }
        };
        swimManager(swimming1);
        Swimming swimming2=new Swimming() {
            @Override
            public void swin() {
                System.out.println("猴子游的还行~~~");
            }
        };
        swimManager(swimming2);
    }
    public static void swimManager(Swimming swimming){
        System.out.println("=====开始游泳=====");
        swimming.swin();
        System.out.println("游泳结束~~~");
    }
}
